package com.cxf.client;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

import com.cxf.iface.Customer;


public class ClientTest {
	 public static void main(String []trgs){

	       JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();

	       //获取服务器端

	       factoryBean.setAddress("http://localhost:8081/customer");

	       //通过客户端的接口获取服务器端的接口

	       factoryBean.setServiceClass(Customer.class);

	      

	       Customer customer =(Customer) factoryBean.create();

	       System.out.println(customer.getByOpenId("o7D-hswWxFMrudyUHl-c2g2RTX9A").getNickName());

	      

	    }
}
